<!DOCTYPE html>
<html>
<head>
<title>源辰-后台商品添加</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="../css/common.css">
<link rel="stylesheet" href="../css/main.css">
<link rel="shortcut icon" href="../../images/yc.png" type="image/x-icon" />

</head>
<body>
<div id="forms" class="mt10">
<div id="app">
	<div class="box">
		<div class="box_border">
			<div class="box_top">
				<b class="pl15">添加商品类型</b>
			</div>
<div id="table" class="mt10">
	<div class="box span10 oh">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" class="list_table">
			<thead>
				<tr>
					<th width="80">编号</th>
                   	<th width="100">商品类别</th>
                </tr>
             </thead>
             <tbody id="goods_type" align="center">
				<tr v-for="item in goodsType">
					<td>{{item.tid}}</td>
					<td>{{item.tname}}</td>
				</tr>
             </tbody>
		</table>
        <div class="page mt10">
		<div class="pagination">
            <ul id ="pagination_info">
				<li class="first-child active"><a href="javascript:void()" onclick=" ">首页</a></li>
				<li class="active"><a href="javascript:void()" onclick=" ">1</a></li>
				<li><a href="javascript:void()" onclick=" ">2</a></li>
				<li class="last-child"><a href="javascript:void()" onclick="">末页</a></li>
			</ul>
		</div>
        </div>
	</div>
</div>
		</div>
		</div>
	</div>
</div>
<script type="text/javascript" src="../js/vue.js"></script>
<script type="text/javascript" src="../js/qs.js"></script>
<script type="text/javascript" src="../js/axios.js"></script>
<script type="text/javascript" src="../js/jquery-3.4.1.min.js"></script>
<script type="text/javascript">
	let app = new Vue({
		el: '#app',
		data:{
			goodsType:[]
		},
		
		methods:{
			//获取商品分类
			getGoodsInfos(){
				axios.get("../../type/list",{
					
				}).then(resp=>{
					if(resp.code == 500) return alert("失败");
						this.goodsType = resp.data.data;
				});
			},
			
			// 解封
			openuser(uid){
				axios.get("../../member/openuser",{
					params:{
						uid
					}
				}).then(resp=>{
					if(resp.code == 500) return alert("失败");
				})
				this.getUserInfos();
			},
			
			//冻结
			closeuser(uid){
				axios.get("../../member/closeuser",{
					params:{
						uid
					}
				}).then(resp=>{
					if(resp.code == 500) return alert("失败");
				})
				this.getUserInfos();
			}
		},
			
		mounted(){
			this.getGoodsInfos();
		}
	})
</script>
</body>
</html>